home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / hptex / hpmanual.tex < prev    next >
Text File  |  1992-08-26  |  53KB  |  1,241 lines

  1. % THIS IS FILENAME MANUAL
  2. %
  3. %       ***This is the Users' Guide to the HP TeX Macro package ***
  4. %
  5. %                    Copyright 1984 Hewlett-Packard Co.
  6. %
  7. \let\indx=\relax
  8. \def\evenheading{\vbox{\hbox to \hsize{\eightrm Page \folio\hfil\HPTEX}
  9.                \nointerlineskip\vskip2pt
  10.                \hbox{\vrule width \hsize height .4pt}}}
  11. \def\oddheading{\vbox{\hbox to \hsize{\eightrm Macros \hfil Page \folio}
  12.                \nointerlineskip\vskip2pt
  13.                \hbox{\vrule width \hsize height .4pt}}}
  14. \def\noheading{\hfil}
  15. \headline{\ifnum\pageno=1\noheading
  16.           \else\ifodd\pageno\oddheading
  17.                 \else\evenheading\fi\fi}
  18. \centerfooting{}
  19.  
  20. \tolerance=1000
  21. \noindentstyle
  22. \font\hplogo=hplogo
  23. \font\csc=amcsc10 \def\headno{\levelno} \def\emspace{\enspace}
  24. \def\lb{$\langle$} \def\rb{$\rangle$}
  25. \def\bs{{\tt \char92}\relax}
  26. \font\bo=amb10
  27. \font\tenbo=amb10
  28. \def\+{{\tt \char92}\relax} \def\_{\kern.06em\vbox{\hrule width.5em}}
  29. \def\[{$\{$} \def\]{$\}$} \def\tbw{{\bf - TO BE WRITTEN -}}
  30. \def\ent{\textbox{\tt ENTER}} \def\sec{{\bf -SECTION NUMBER HERE-}}
  31. \def\degrees{$^\circ$}
  32. \def\gt{$>$}
  33. \def\spacechar{\hskip1pt\lower3pt\vbox{
  34.               \hbox to 5pt{\vrule height4pt width.009in
  35.                             \hfill
  36.                             \vrule height4pt width.009in}
  37.               \hrule depth.009in height0pt}\hskip2pt}
  38.  
  39. \firstlevelhead{\need.75in\null\bigskip\leftline{\fourteenbf\levelno\enspace%
  40.                 \title}%
  41.      \medskip\ctswrite{\hskip15pt\tenrm\title}}
  42. \secondlevelhead{\need.6in\medskip\leftline{\twelvebf\levelno\enspace\title}%
  43.      \ctswrite{\hskip30pt\tenrm\title}}
  44. \thirdlevelhead{\need.5in\medskip\leftline{\twelvebf\levelno\enspace\title}%
  45.      \ctswrite{\hskip45pt\ninerm\title}}
  46.  
  47. \def\bs{{\tt \char92}\relax}
  48. \def\+{{\tt \char92}\relax}
  49.  
  50. \def\tspec{\lb{\sa table spec.}\rb}
  51. \def\colspec{\lb{\sa column spec.}\rb}
  52. \def\col{\lb{\sa column list}\rb}
  53.  
  54.  
  55. \def\cmd#1{\need 0.5in\bigskip {\tentt\bs #1}\lbreak}
  56. %\def\mcmd#1{\need 0.5in\bigskip {{\tentt\bs #1}}\lbreak}
  57. %\def\\#1{\lbreak\indent{{\tentt\bs #1}}}
  58. \def\lb{$\langle$}
  59. \def\rb{$\rangle$}
  60. \def\[{$\{$}
  61. \def\]{$\}$}
  62. \def\blk{\lb{\sa blockname}\rb}
  63. \def\hor{\lb{\sa horizontal list}\rb}
  64. \def\int{\lb{\sa integer}\rb}
  65. \def\dim{\lb{\sa dimension}\rb}
  66. \def\ver{\lb{\sa vertical list}\rb}
  67. \def\vol{\lb{\sa Volume Name}\rb}
  68.  
  69. \null
  70. \vskip1in
  71. \centerline{\eighteenbf THE HP \TeX\ MACROS}\footnote{}{\eightrm\copyright
  72.                                                      1984 Hewlett-Packard Co.}
  73.  
  74. \vskip.5in
  75. \centerline{HEWLETT-PACKARD CO.}
  76. \vskip1.47in
  77.  
  78. \level1{Introduction}
  79. This set of macros was written as part of \HPTEX, Hewlett-Packard's software
  80. package designed to facilitate the use of \TeX\ on the HP Series 200 Desktop
  81. Computers.  The \HPTEX\ program can be run on either an SRM based, or a
  82. stand-alone (LIF) system, and requires 1.25 Mbytes main memory and a minimum
  83. of 15 Mbytes mass storage.  It uses an HP 2688A Laser Printer.
  84.  
  85. The HP2688A is a page printer which uses scanned electrophotography technology
  86. to print computer output on single sheet paper.  The 300 dots per inch
  87. resolution, high contrast and speed, plus sophisticated character printing,
  88. allow a high degree of application flexibility.  Unique features include
  89. 90\degrees\ rotation of page print, multiple pages of data output per printed
  90. sheet, and a graphics option.  The print rate is approximately 12 pages per
  91. minute.
  92.  
  93. The \HPTEX\ macro package  is designed to supplement \TeX\ by providing macros
  94. for formating documents and for controlling the HP2688A.  The user of \HPTEX\
  95. can use any of the \TeX\ commands as well as the \HPTEX\ macro commands.
  96.  
  97. While the formating macros include macros for headings and footings,
  98. paragraph style, lists, lines, boxes, paragraph headings, multiple columns,
  99. tables, and table of contents, they are not meant to be a complete system.
  100. They are intended to enable the user to get
  101. started, and to provide useful macros that can be modified and used as
  102. examples by the user for the creation
  103. of a customized macro package.
  104.  
  105. A second release of \HPTEX\ is planned that will include graphics capability.
  106.  
  107. \vfil
  108. On \indx{syntax}
  109. lines, when curly braces ``\[$\ldots$\]'' are shown, they are required in the
  110. source file, text between
  111. angle brackets ``\lb$\ldots$\rb'' identifies a parameter variable,
  112. and the character ``\spacechar '' represents a required space.
  113. \vfil\eject
  114.  
  115. \level1{ Document Formatting Macros}
  116. The following HP \TeX\ commands control the basic style and formatting
  117. of a document:
  118.  
  119. \level2{Page Layout}
  120. The HP \TeX\ defaults for \indx{page layout} are the same as they are in
  121. the \TeX\ program.  That is,
  122. all margins are set to approximately
  123. one inch from the edges. (Plain \TeX\ sets {\tt \+vsize=8.9in} and
  124. {\tt \+hsize=6.5in}.) \indx{Headings and footings} are printed {\bo outside}
  125. those margins.
  126.  
  127. The following macros affect the running head and the footing of
  128. each page. The heading and footing lists are expanded during the
  129. output routine so the \TeX\ commands \indx{{\tentt\bs firstmark}},
  130. \indx{{\tentt\bs topmark}} and
  131. \indx{{\tentt\bs botmark}} are compatible here.
  132.  
  133. \need.5in\bigskip\relax{{\tentt \+centerheading}}\[\hor\]\lbreak
  134.       \relax{{\tentt \+leftheading}}\[\hor\]\lbreak
  135.       \relax{{\tentt \+rightheading}}\[\hor\]\lbreak
  136.       \relax{{\tentt \+outsideheading}}\[\hor\]\lbreak
  137.       \relax{{\tentt \+insideheading}}\[\hor\]\lbreak
  138. These macros accept text which is to be placed at the top of every page.
  139. The first three macros place the argument in the center, left, or right
  140. of the page respectively.
  141. {\tt\bs outsideheading} and {\tt\bs insideheading},
  142. if specified, override the left and right headings. On odd pages, the
  143. inside heading will appear on the left, outside on the right.  Even
  144. pages are the opposite. (This feature is helpful when the output is
  145. to be used as two-sided copy.)
  146.  
  147.  
  148. \need.5in\bigskip\relax{{\tentt \+centerfooting}}\[\hor\]\lbreak
  149.       \relax{{\tentt \+leftfooting}}\[\hor\]\lbreak
  150.       \relax{{\tentt \+rightfooting}}\[\hor\]\lbreak
  151.       \relax{{\tentt \+outsidefooting}}\[\hor\]\lbreak
  152.       \relax{{\tentt \+insidefooting}}\[\hor\]\lbreak
  153. These are like the above commands, only they are for footings at the bottom
  154. of each page. For example, if page numbers
  155. are desired in the left side of the bottom of each page, type:
  156. {\tt\bs leftfooting\[\indx{\bs folio\]}}
  157.  
  158. {\tt\bs outsidefooting} and {\tt\bs insidefooting} will
  159. produce similar results as {\tt\bs outsideheading} and
  160. {\tt\bs insideheading} (see above). The default in HP \TeX\ is
  161. {\tt \+centerfooting\[\+folio\]}. This produces page numbers at
  162. the center of the bottom of each page.
  163.  
  164. \need.5in\bigskip\relax{{\tentt \+noheading}}\lbreak
  165.       \relax{{\tentt \+nofooting}}\lbreak
  166. These macros turn off headings or footings for the current and all
  167. successive pages until the {\tt\bs resumefooting} or
  168. {\tt\bs resumeheading} command is used.
  169.  
  170. \need.5in\bigskip\relax{{\tentt \+suspendheading}}\int\lbreak
  171.       \relax{{\tentt \+suspendfooting}}\int\lbreak
  172. These macros suspend headings or footings for the specified number of
  173. pages or until the use of a {\tt\bs resumeheading} or {\tt\bs resumefooting}.
  174.  
  175. \need.5in\bigskip\relax{{\tentt \+resumeheading}}\lbreak
  176.       \relax{{\tentt \+resumefooting}}\lbreak
  177. These macros undo the effects of the {\tt\bs suspendheading},
  178. {\tt\bs noheading}, {\tt\bs suspendfooting} and
  179. {\tt\bs nofooting} macros above.
  180.  
  181. \break
  182. \level2{Paging}
  183.  
  184. \cmd{\indx{newpage}}
  185. This macro forces a \indx{page eject} if not on a new page.\note{\tenpoint
  186. If {\tt \+newpage, \+oddpage}, or {\tt \+evenpage}
  187. occur at the bottom of a full page, they will cause an extra page
  188. eject.  If this happens, insert an {\tt \+eject} just before the
  189. page command.}
  190.  
  191. \cmd{\indx{oddpage}}
  192. This macro causes a page eject, and if the current page is an odd-numbered
  193. page, leaves an extra blank page so that the following text is
  194. guaranteed to begin on an odd-numbered page.
  195.  
  196. \cmd{\indx{evenpage}}
  197. This macro is similar to oddpage, but the following text will appear on
  198. an even rather than an odd numbered page.
  199.  
  200. The {\bo plain} \TeX\ command, {\tt\+pageno} will set the current page number
  201. to the specified page number.  (See ``Some Useful \TeX\ Commands'' in
  202. Chapter~2 of this manual.)
  203.  
  204. \level2{Paragraph Style}
  205. As \TeX\ accepts text from the input file, the text is formatted into
  206. paragraphs. The following commands can be used to control the shape
  207. of the paragraphs.
  208.  
  209.  
  210. \cmd{\indx{inset}=\dim}
  211. Specifies a general amount of indentation to be used with itemized
  212. lists, notes, warnings and indent blocks. Default is 0.5
  213.  inch.
  214.  
  215. \need.5in\bigskip\relax{{\tentt \+start\[indent\]}}\lbreak
  216.       \relax{{\tentt \+finish\[indent\]}}\lbreak
  217. These commands are used to indent the left margin by the inset
  218. dimension. The right margin is unaffected by this block.
  219.  
  220. \cmd{\indx{indentspace}=\dim}
  221. This command assigns the indentation value for the first line of all succeeding
  222. paragraphs when {\tt\bs indentstyle} is in effect. The default is
  223. 20 points.
  224.  
  225. \cmd{\indx{indentstyle}}
  226. This causes the first line of each paragraph to be indented
  227. (the amount of the indentation is assigned by the {\tt\bs indentspace}
  228. command). This is the default paragraph style.
  229.  
  230. \cmd{\indx{noindentstyle}}
  231. This causes the paragraphs to be formatted with no indentation.
  232. The nominal \indx{spacing} between paragraphs is 5 points greater without
  233. indentation than when {\tt\bs indentstyle} is being used.
  234. \start{note}
  235. \centerline{-- NOTE --}
  236. Spacing between paragraphs can be user specified by using the {\tt
  237. \bs parskip} command.
  238. \finish{note}
  239.  
  240. \level2{Itemized and Bulleted Lists}
  241. The following macros are aids in producing lists. The various list commands
  242. cause indentation at various levels and use various tokens (numbers, letters,
  243. dots, dashes, $etc.$) to the left of the
  244. first line of the listed item to set off the list entry.
  245.  
  246. \need.5in\bigskip\relax{{\tentt \+numbereditems}}\lbreak
  247.       \relax{{\tentt \+lettereditems}}\lbreak
  248.       \relax{{\tentt \+Lettereditems}}\lbreak
  249.       \relax{{\tentt \+romanitems}}\lbreak
  250.       \relax{{\tentt \+Romanitems}}\lbreak
  251.       \relax{{\tentt \+squareditems}}\lbreak
  252.       \relax{{\tentt \+dotteditems}}\lbreak
  253.       \relax{{\tentt \+dasheditems}}\lbreak
  254. These macros initialize the tag allocation macro {\tt\bs itemtag}.
  255. Default is {\tt\bs numbereditems}.
  256.  
  257. \need.5in\bigskip\indx{{\tentt \+numberedsubitems}}\lbreak
  258.       \relax{{\tentt \+letteredsubitems}}\lbreak
  259.       \relax{{\tentt \+Letteredsubitems}}\lbreak
  260.       \relax{{\tentt \+romansubitems}}\lbreak
  261.       \relax{{\tentt \+Romansubitems}}\lbreak
  262.       \relax{{\tentt \+squaredsubitems}}\lbreak
  263.       \relax{{\tentt \+dottedsubitems}}\lbreak
  264.       \relax{{\tentt \+dashedsubitems}}\lbreak
  265. These macros initialize the tag allocation macro {\tt\bs subitemtag}.
  266. Default is\lbreak {\tt\bs letteredsubitems}.
  267.  
  268. \cmd{\indx{itemtag}}
  269. This macro causes a number, letter, roman numeral, square, dot or dash
  270. to be printed as the item specifier
  271. depending upon what initialization has taken place (see above).
  272.  
  273. \cmd{\indx{subitemtag}}
  274. Similar to {\tt\bs itemtag} but pertains to subitems.
  275.  
  276. \cmd{\indx{square}}
  277. This macro prints a .4em-by-.4em square ( \square\ ). This macro can be used at
  278. any time a horizontal list is being built (such as the middle of a
  279. paragraph),
  280. but it is particularly useful as the argument for the {\tt\bs itemlist} macro.
  281. (This command produces the same symbol as \TeX 's {\tt \+bull} command.)
  282. \cmd{\indx{dott}}
  283. This macro prints a solid round dot ( \dott\ ). (Same as {\bo plain} \TeX 's
  284. {\tt \$\+bullet\$}.)
  285.  
  286. \cmd{\indx{emdash}}
  287. Sets a horizontal rule one ``\indx{em}'' long ( \emdash\ ).
  288.  
  289. \cmd{\indx{itemlist}\[\hor\]}
  290. This macro introduces an item of a list by indenting both left and right
  291. margins by the \dim\ specified in the last {\tt\bs inset} command.
  292. The \hor\ is inserted within braces to specify the token
  293. which is to set off the text. If the token has already been
  294. specified (using {\tt \bs dotteditems, \bs Romanitems}, $etc.$),
  295. or the default {\tt \bs numbereditems} is acceptable,
  296. then the command {\tt \bs itemtag} can be inserted here.
  297. The text of the item follows.  (The text
  298. does {\bo not\/} need to be enclosed within braces.)
  299. Indentation continues only for the duration
  300. of one paragraph (if more than one paragraph is desired in an
  301. item, {\tt\bs itempar} should be used).
  302. The use of {\tt\bs itemlist} resets the subitem tag.
  303.  
  304. \cmd{\indx{subitem}\[\hor\]}
  305. This macro is similar to {\tt\bs itemlist}, but the indentations are twice as
  306. large as for {\tt\bs itemlist}. This can be used to indicate a
  307.  second level of list. (See {\tt \bs itemlist} for contents of
  308.  the \hor .
  309.  
  310. \need.5in\bigskip\relax{{\tentt \+itempar}}\lbreak
  311.       \relax{{\tentt \+subitempar}}\lbreak
  312. These macros are used to start new paragraphs within an item or
  313. subitem respectively.
  314.  
  315. \cmd{\indx{enditems}}
  316. This commands properly ends an itemized list by resetting the item counter
  317. and appending {\tt\bs bigskip} \indx{glue}.
  318.  
  319. \cmd{\indx{itm}}
  320. Similar to {\tt\bs itemlist\[\bs itemtag\]} except that a
  321. period is appended to the tag if it is a letter, number
  322. or roman numeral. With this command, the item tag must be
  323. specified ahead of time using the command
  324. {\tt \bs dotteditems, \bs lettereditems}, $etc.$, unless the
  325. default ({\tt \bs numbereditems}) is acceptable. Again,
  326. {\tt\bs itm} will {\bo not} accept any \hor\
  327. as an item tag specifier.
  328.  
  329. \cmd{\indx{sitm}}
  330. Similar to {\tt\bs itm} but pertains to subitems. Like
  331. {\tt\bs itm}, {\tt\bs sitm} will {\bo not}
  332. accept any \hor\ as a subitem tag specifier. The subitem tag must
  333. be specified beforehand, unless the default
  334. ({\tt \bs letteredsubitems}) is acceptable.
  335. %\need3in
  336. \start{note}
  337. \centerline{-- NOTE --}
  338. If you enter a local \indx{block structure} prior to setting an itemized list,
  339. and want to exit that structure immediately after your last item, then
  340. you must first be sure that you are in {\bo \indx{vertical mode}}.
  341. Otherwise, the last item may not be indented properly.
  342.  
  343. Three ways to accomplish this are by using {\tt\bs enditems,
  344. \bs vskip}, or {\tt\bs par}. \finish{note}
  345.  
  346. \level2{Line Specifier Macros}
  347. The content of individual lines can be controlled, and they can be
  348. centered or justified using the following
  349. commands.
  350.  
  351. \cmd{\indx{centerline}\[\hor\]}
  352. This takes the text within the brackets and centers it between the
  353. margins. The line does not count as a paragraph, so the normal
  354. interparagraph space is not inserted above the line. If this command
  355. follows a paragraph, it is
  356. usually appropriate to precede it with a {\tt\bs vskip}. This command
  357. has been redefined from {\bo plain} \TeX\ in that it uses the
  358. HP macro {\tt \+lline} (described below), so {\tt \+leftskip}
  359. and {\tt \+rightskip} values are taken into account.
  360.  
  361. \cmd{\indx{lline}\[\hor\]}
  362. This is very similar to the plain \TeX\ {\tt\+line} command
  363. in that it creates a horizontal box that is the width of the current
  364. {\tt\+hsize}, except that {\tt\+lline} takes into account
  365. the values of {\tt\+leftskip} and {\tt\+rightskip}
  366. if they have been specified.  In other words {\tt\+lline}
  367. stays within the current margins. The \hor \ is the contents of
  368. the horizontal box.
  369.  
  370.  
  371. \cmd{\indx{leftline}\[\hor\]}
  372. This left justifies the contents of the \hor . The comments about vertical
  373. spacing above apply here, also. This command has also been redefined
  374. to use {\tt \+lline} (see {\tt \+centerline}, above).
  375.  
  376. \cmd{\indx{rightline}\[\hor\]}
  377. This right justifies the contents of the \hor . The comments about vertical
  378. spacing above apply here, also. This command has also been redefined
  379. to use {\tt \+lline} (see {\tt \+centerline}, above).
  380.  
  381. \cmd{\indx{raggedright}}
  382. The {\tt\bs raggedright} macro causes paragraphs to be formatted
  383. in such a way that they are not necessarily justified
  384. on the right margin. This command has also been redefined from
  385. {\bo plain} \TeX\ in that {\tt \+rightskip} values are preserved.
  386.  
  387. \cmd{\indx{justify}}
  388. This macro has the opposite effect of the {\tt\bs raggedright} macro
  389. and causes the text to be right justified
  390. ({\tt\bs justify} is the default in HP \TeX ).
  391.  
  392. \level2{Boxes}
  393.  
  394. \cmd{\indx{boxline}=\dim}
  395. This macro assigns the width of the lines used for {\indx{boxes}. The default
  396. boxline dimension is 0.01332 inch.
  397.  
  398. \cmd{\indx{boxspace}=\dim}
  399. This macro assigns the width of the space between a boxed item and
  400. the line of the box. The default width in HP \TeX\ is 5 points.\super{4}
  401.  
  402. \cmd{\indx{boxit}\[\hor\]}
  403. This macro encloses the argument in a box. If encountered
  404. while making a line of text, the box's bottom line will
  405. be along the baseline of the text. The \hor\ may contain multiple
  406. lines separated by {\tt\bs cr} to be centered within the box. Note
  407. that each line is then treated as a {\bo group}, so font changes,
  408. $etc.$~on one line will not affect the next line.
  409.  When using this command, the \hor\ will be
  410. raised somewhat above the line, \boxit{like this.}
  411. If you desire that the text not be raised above the baseline,
  412. use the {\tt\bs textbox} command (described below).
  413.  
  414. \cmd{\indx{textbox}\[\hor\]}
  415. This command causes a box to be placed around the \hor ,
  416. {\bo without} altering the text, \textbox{like this.} A
  417. textbox cannot be broken from one line of text to another.
  418.  
  419. \cmd{\indx{centerbox}\[\hor\]}
  420. This macro centers a box horizontally on the page
  421. and inserts space above and below.
  422. Multiple lines can be specified using {\tt\bs cr} (see
  423. {\tt \bs boxit} description). A {\tt \+centerbox} within a
  424.   {\tt \+centerbox} will not work, but {\tt \+boxit} inside
  425.  {\tt \+centerbox} will.
  426.  %\need1.25in
  427. \level2{Notes and Warnings}
  428. Two other text structures available with the HP \TeX\ macro package are notes
  429. and warnings.
  430.  
  431. \need.5in\bigskip\relax{{\tentt \+start\[note\]}}\lbreak
  432.       \relax{{\tentt \+finish\[note\]}}\lbreak
  433. A note is inset twice the {\tt\bs inset} dimension on both margins and
  434. set apart from the rest of the text by extra vertical space.
  435. If a note would otherwise start less than half an inch from the
  436. bottom of a page, a page eject is performed prior to the note.
  437. {\tt\bs finish\[note\]} signifies the end of the note.
  438.  
  439. \need.5in\bigskip\relax{{\tentt \+start\[warning\]}}\lbreak
  440.       \relax{{\tentt \+finish\[warning\]}}\lbreak
  441. A warning is similar to a note, except that is also set apart by horizontal
  442. rules above and below the text. {\tt\bs finish\[warning\]}
  443. signifies the end of the warning text.
  444.  
  445. \level2{Verbatim Mode}
  446. Verbatim mode will cause text to be printed ``as is,''
  447. without any justification. Special characters in this mode
  448. are the backslash (\bs ) and the curly brackets (\[), (\]).
  449. Most other characters can be used and will be printed \indx{verbatim}.
  450.  
  451. Verbatim mode is intended for use with simple text which does
  452. {\bo not} contain a large number of control sequences.
  453. The reason for this restriction is that there are many
  454. characters (such as a space, a \indx{tilde}, $etc.$)
  455. which take on different meanings in verbatim mode.  Some of these may be
  456. imbedded within a control sequence and can cause
  457. problems when they are expanded.
  458.  
  459. You will usually want to select a ``non-proportionally spaced''
  460. font (like ``tt'') for use in verbatim mode.  The
  461. reason for this is that ``proportional fonts'' (like ``rm'')
  462. will cause the printed output to be aligned differently
  463. than what appears on the CRT during source file typing. Other
  464. non-proportional fonts available with the HP 2688A Laser Printer
  465.  are Courier, Gothic, Pica, Script, Prestige and Line Printer.
  466.  
  467. \start{note}
  468. \centerline{-- NOTE --}
  469. Although verbatim mode using \indx{non-proportional fonts} will
  470. {\bo usually} produce output
  471. that exactly matches what you see on the CRT, there is
  472. at least one exception to this.  Long sequences of characters
  473.  may be spaced
  474. slightly differently than a string
  475. of blank spaces of identical length .  This is
  476. a result of the rounding anomalies that occur when \TeX 's
  477. {\bo ideal} character sizes are converted to the printer's
  478. {\bo actual} sizes.
  479. \finish{note}
  480. \cmd{\indx{start\[verbatim\]}}
  481. This macro causes the following text to be printed ``verbatim''
  482. without any justification.
  483.  
  484. \cmd{\indx{finish\[verbatim\]}}
  485. This macro ends the verbatim mode described above.
  486.  
  487. %\need1.25in
  488. \level2{Paragraph Levels}
  489. These macros can be used to create \indx{paragraph headings}
  490. of four different levels.
  491. The \hor, and page number can be written
  492. to the file \lb{\sa jobname}\rb\lower.3em\hbox{*}
  493. to be used for a table of contents (the asterisk ``\lower.3em\hbox{*}''
  494. signifies the {\tt contents} file).
  495.  
  496. The command {\tt\+ctswrite\hor} will automatically open a file and write the
  497. \hor\ and the page number to the file.  The {\tt\+contents} command
  498. then uses the \lb{\sa jobname}\rb\lower.3em\hbox{*} file to
  499. create the \indx{table of contents} (refer to the {\tt\+contents} command
  500. description in this section).
  501.  
  502. \cmd{\indx{level}\lb\sa integer between 1 and 4\rb\[\hor\]}
  503. This is the command used to print a paragraph heading.  Whatever
  504. format is specified using the commands listed below ({\tt \+firstlevelhead,
  505. \+secondlevelhead}, $etc.$) will be used. For example, the command used to set
  506. the paragraph heading of this section looked like this:
  507.  
  508. \centerline{\tt \+level3\[Paragraph Levels\]}
  509.  
  510. The {\tt \+level} command will automatically update the {\tt\bs levelno}
  511. to print the paragraph head.
  512.  
  513. \need.5in\bigskip\relax{{\tentt \+firstlevelhead}}\[\hor\]\lbreak
  514. \relax{{\tentt \+secondlevelhead}}\[\hor\]\lbreak
  515. \relax{{\tentt \+thirdlevelhead}}\[\hor\]\lbreak
  516. \relax{{\tentt \+fourthlevelhead}}\[\hor\]\lbreak
  517. These commands specify the tokens that are inserted to format
  518. each of the various head levels. They should be used when the
  519. default conditions of HP \TeX , as described below,
  520.  are not satisfactory. A control sequence {\tt \bs title}
  521. is defined to be the \hor\ from the corresponding {\tt \bs level}
  522. command. For example, the command:
  523. \start{verbatim}\tt{\hfuzz=31pt
  524.          \+secondlevelhead\[\+need.75in\+bigskip\+leftline\[\+fourteenbf%
  525.               \+levelno\+enspace\+title\]\+medskip%
  526.               \+ctswrite\[\+hskip15pt\+tenrm\+title\]\]}
  527.     \finish{verbatim}
  528. \vskip3pt\noindent
  529.  would cause all second level paragraph heads to be printed on
  530. a new page if less than .75 inch remains on the current page.
  531. The title will be left justified in fourteen point boldface
  532. type. The level number is followed by an ``enspace.''
  533.  ``Bigskip'' \indx{glue} is inserted before the title with a ``medskip''
  534. after.  The \indx{{\tentt\+ctswrite}} command specifies how the
  535. level heading will be written in the table of contents, as
  536. described below.
  537.  
  538. Whenever you define a {\tt \bs firstlevelhead, \bs secondlevelhead}, $etc.$,
  539. command to specify the formatting of paragraph headings, you must also
  540. specify how it will be written in the table of contents (if
  541. you plan to create one).  The command for doing this is
  542. {\tt \bs ctswrite}.  For example, the fourth level head was
  543. redefined from the HP \TeX\ defaults in this document, and the
  544. contents writing command was used as follows:\lbreak
  545. \centerline{\tt \bs ctswrite\[\bs hskip45pt\bs ninerm\bs title\]}
  546. This causes all fourth level headings in the table of contents
  547. to be inset 45~points and be written in nine--point roman type.
  548.  
  549. The default HP \TeX\ paragraph level headings
  550. are formatted as follows: {\tt \bs level1} begins on a new page,
  551. prints the title in 14 point bold face type and down 1.5 inches
  552. from the top of the page. {\tt \bs level2}
  553.  requires that at least .75 inch remain on the
  554. page. If so, the title is printed with some vertical space above it,
  555. otherwise, it is set on the top of the next page. In any case, it is printed
  556. in 12 point boldface type. {\tt \bs level3} and
  557. {\tt \bs level4} are similar, but
  558. require less space to remain on the page and print the title in 10
  559. point bold face and 10 point roman respectively.
  560.  
  561. The ``levelhead'' macros are {\bo local} to
  562. their \indx{block structure}.  This provides a simple means
  563. to return to the HP \TeX\ default levelhead
  564. style.  All you would need to do is enclose the command
  565. and any text you want affected within braces.  After the
  566. closing brace, \TeX\ will return to the default format. Note
  567. that this should only be attempted for {\bo shorter} blocks.
  568. Creating large blocks of several pages in length can cause
  569. \TeX\ to run out of memory.
  570.  
  571.  
  572. \start{note}\centerline{-- NOTE --}
  573. If you need to change the font style or size within a level
  574. heading, you must specify the {\bo entire} font name,
  575. (for example: {\tt \bs tentt}$\ldots$ not {\tt \bs tt}).
  576. \finish{note}
  577. \cmd{\indx{levelno}}
  578. This macro can be used whenever the author desires the number
  579. of the heading to appear in the document. The number of the
  580. various levels of headings appear, separated by periods.
  581. For example, typing {\tt Section \bs levelno} might result
  582. in: Section 1.2.7.1 if this was the first fourth-level heading
  583. of the seventh third-level section of the second$\ldots$ $etc.$
  584. Levels lower than the last modified level do not appear in
  585. {\tt\bs levelno}.
  586.  
  587. \def\delim{.}
  588. \cmd{\indx{setlevelno}\[\int\delim\int$\ldots$\int\]}
  589. This macro can be used for presetting the one through
  590. four heading numbers. If you use
  591. this command before a {\tt\+level} command, then the
  592. counter will increment to the next number when the
  593. {\tt\+level} command is encountered. Therefore, you
  594. should preset to one number below the desired level.
  595.  You cannot preset the level 2 counter without
  596.  specifying the level 1, or the level 3  without level 1 and 2
  597.  and so on. (For example, you cannot specify {\tt\+setlevelno\[1.~.~.4\]},
  598.  you must specify {\tt \[1.\int .\int .4\]}.)
  599.  
  600. \cmd{\indx{contents}}
  601. This macro forces a page eject and produces a \indx{table of contents}
  602. on the following pages as dictated by the previous heading macros.
  603. No vertical \indx{glue} is inserted, so you may want to use a {\tt \bs vfil}
  604. command immediately before {\tt \bs contents}.
  605.  
  606. \need.5in\bigskip\relax{{\tentt \+topofcontents}}\[\ver\]\lbreak
  607.       \relax{{\tentt \+botofcontents}}\[\ver\]\lbreak
  608. These macros specify a list to be placed above and below the table of
  609. contents. The \ver\ may include logos, rules, $etc.$ The table of contents
  610. is quite rigid, so a {\tt\bs vfill} is appropriate in at least one \ver.
  611. Defaults in HP \TeX\  will format the table of contents as they appear in the
  612. beginning of this manual (with the exception of the headings).
  613. \start{note}\need1in
  614. \centerline{-- NOTE --}
  615. {\tt\+topofcontents} and {\tt\+botofcontents} must
  616. {\bo both} be specified {\bo before} the
  617. {\tt\+contents} command is used. (That is, you cannot
  618. specify {\tt\+botofcontents} after {\tt\+contents},
  619. even though this seems logical.)
  620. \finish{note}
  621. \level2{Multiple Columns}
  622.  
  623. The following macros control the number of columns on the page.
  624. Multiple column and single column text can be mixed on a page by
  625. using the following commands.
  626.  
  627. \cmd{\indx{columnspace}=\dim}
  628. This command specifies the amount of space between columns on a page.
  629. This dimension should be assigned before entering multicolumn mode and
  630. should remain unchanged for the duration thereof. The default
  631. column space in HP \TeX\ is 0.5 inch.
  632.  
  633. \need.5in\bigskip\relax{{\tentt \+start\[twocolumns\]}}\lbreak
  634.       \relax{{\tentt \+start\[threecolumns\]}}\lbreak
  635.       \relax{{\tentt \+finish\[twocolumns\]}}\lbreak
  636.       \relax{{\tentt \+finish\[threecolumns\]}}\lbreak
  637. These four commands cause the text to be formatted into multiple columns.
  638. If a {\tt\bs balance},
  639.  {\tt\bs newpage}, {\tt\bs evenpage} or {\tt\bs oddpage} macro is
  640. encountered while in multicolumn mode, the columns are balanced
  641. on the page prior to the page eject. Exit from multicolumn mode
  642. causes the columns to be balanced as well. Unbalanced columns may
  643. be obtained by using {\tt\bs vfill} {\tt\bs eject} while in multicolumn mode.
  644. Balancing forces the top lines of each column to be lined up. The
  645. bottom lines are lined up as well unless {\tt\bs raggedbottom} has been
  646. specified. Discardable items (such as glue, penalties, $etc.$)
  647. immediately following these commands will be ignored. (To prevent
  648. this, you may use {\tt\+null} immediately
  649. after {\tt\+finish\[$n$columns\]}.)
  650.  
  651. \cmd{\indx{balance}}
  652. This command causes the columns to become balanced. Discardable
  653. items (such as \indx{glue}, penalties, $etc.$) immediately following these
  654. commands will be ignored. (To prevent
  655. this, you may use {\tt\+null} immediately
  656. after {\tt\+finish\[$n$columns\]}.)
  657.  
  658.  
  659. \start{note}
  660. \centerline{-- NOTE --}
  661. When using multiple columns, you may find it helpful to use the
  662. plain \TeX\ commands {\tt\+tolerance} and
  663. {\tt\+hbadness} (to increase the stretch and
  664. shrinkability of interword \indx{glue} and decrease complaints
  665. regarding ``underfull hboxes''). See {\tenit The
  666. \TeX book} for more information.
  667. \finish{note}
  668.  
  669. \level2{Tables}
  670. The following macros are useful for setting \indx{tables}. These
  671. macros are different from the plain \TeX\ {\tt\bs halign} and
  672. {\tt\bs valign} commands in that
  673. they format one row at a time. The table can be justified as a whole
  674. either left, right or centered. As long as the number of columns
  675. in each entry remains constant, the entire table appears justified.
  676. (Interesting figures, such as pyramids, hopscotch boards, $etc.$ can
  677. be produced by changing the format and the number of
  678. columns in each entry.)
  679. Each column of the table has its own user specified width.
  680. Between each column
  681. is a vertical line (which can be easily made invisible).
  682. This vertical rule takes no space from any column so the rule
  683. width may be varied without altering the column dimensions.
  684. An entry may also be designed to span two or three columns.
  685. Horizontal bars are
  686. treated exactly the same as data entries. The macro \indx{{\tentt\bs tbar}}
  687. can be used to produce such a bar.
  688.  
  689. \cmd{\indx{tableline}=\dim}
  690. This parameter specifies the dimension of bars and rules in
  691. all subsequent entries. This parameter should remain unchanged
  692. throughout the entire table. Default value is 0.01332 inch.\super{7}
  693. \start{note}
  694. \centerline{-- NOTE --}
  695. There may be some occasion when printing a table that you
  696. get the error message,\lbreak
  697. ~~~~``{\tt Printer error: \lbreak
  698. ~~~~**Could not process all the data, data lost.}''\lbreak
  699. The printer uses a variety of different length line segments to
  700. ``build'' a line.  If the {\tt tableline} specification you have
  701. chosen requires too many individual segments to make up the exact
  702. specification, it may cause this error.
  703. There are a few remedies available, as follows:
  704.  
  705. ---If you are using the default magnification (1.0), then
  706. try using the default {\tt tableline} dimension (just leave out
  707. the {\tt\+tableline} command.
  708.  
  709. ---If you are using a file magnification value other than 1.0, then alter
  710. your {\tt\+tableline} specification so that its value, when converted
  711. to dots (multiply length in inches $\times\ 300$), is a power of 2 ($i.e.$ 1, 2,
  712. 8, 16, 32 or a multiple of any of these except 1).
  713. \finish{note}
  714.  
  715. \cmd{\indx{tablespace}=\dim}
  716. This parameter specifies the minimum amount of space to be placed
  717. between the vertical rules and data entries in the table. Default in
  718. HP \TeX\ is 5 points.
  719.  
  720. \cmd{\indx{tableformat}\[\tspec|\colspec\dim|$\ldots$|\colspec\dim\]}
  721. This command specifies the table format. Note that a \indx{vertical bar}
  722. (\indx{{\tentt |}}) is required as a separator
  723. between specifications, but not at the beginning or end of the
  724. list (different than {\tt \+tablerow} or {\tt \+tablebar}).
  725.  
  726. \tspec\  can be any of {\tt\bs leftline}, {\tt\bs rightline},
  727.  or {\tt\bs centerline}. \colspec\ can be any of
  728. {\tt\bs leftline}, {\tt\bs rightline}, {\tt\bs centerline} or
  729. {\tt\bs paragraph}. Other options are
  730. allowed if you make them yourself; for example, if you type:
  731. \par\vskip3pt
  732. \centerline{\tt\bs def\bs mything\#1\[\bs line\[\bs hskip 1in \#1\bs hss\]\]}
  733. \par\vskip3pt
  734. \noindent then {\tt\bs mything} would be a valid \tspec\ option that
  735. would print the table 1 inch from the left margin.
  736. The \colspec\ is always a single token ({\tt\bs leftline}, {\tt\bs rightline},
  737. {\tt\bs centerline} or {\tt\bs paragraph}), and is
  738. followed by a dimension. The token specifies the standard
  739. justification of the column ({\tt\bs paragraph} must be used if the
  740. column is to contain paragraphs), and the dimension specifies the
  741. absolute width of the column. Again, if you are not satisfied with the
  742. selection you can make your own---the rules are that the macro consume
  743. one token (containing the text) and produce a box of width {\tt\bs hsize}.
  744. %\need2in
  745. \start{note}
  746. \centerline{-- NOTE --}
  747. If the {\tt\bs paragraph} column specification is used, {\tt \+parskip}
  748. must be 0 points (this is the default).  Otherwise, the paragraph entry
  749. will be raised or lowered by the current {\tt \+parskip} amount and the
  750. table will be out of alignment.  If you are using {\tt\+noindentstyle}
  751. and have not reset {\tt\+parskip}, then inserting an {\tt\+indentstyle}
  752. command just prior to the table will return to the proper (0 points) parskip.
  753. \finish{note}
  754.  
  755. \need.5in\bigskip
  756. \relax{{\tentt \+tablerow}}\[{\tt |}\col{\tt |}\col$\ldots${\tt |}
  757.      \col{\tt |}\]\lbreak
  758. \relax{{\tentt \+tablebar}}\[{\tt |}\col{\tt |}\col$\ldots${\tt |}
  759.      \col{\tt |}\]\lbreak
  760. These commands are used to build tables. {\tt\bs tablerow} should
  761. be used if the \col\ contains text, while {\tt\bs tablebar} should
  762. be used for bars or other non-text entries. Horizontal bars are
  763. obtained by using either {\tt\bs vrule height} \dim , {\tt width} \dim\
  764.  or {\tt\bs tbar}
  765. as a \col\ ({\tt\bs tbar} uses {\tt\bs tableline} as the rule height).
  766. The following syntax holds true for both macros:\dotteditems
  767.  
  768. \itm A \indx{vertical bar} (\indx{{\tentt |}}) or a \indx{tilde} (\~{}) must be
  769. beginning and end of each column, including the first and last entry
  770. (differs from {\tt \+tableformat} syntax).
  771. \itm The \indx{vertical bar}s ({\tt |}) may be replaced by tildes (\~{})
  772. if a visible vertical bar in that position is not desired.
  773.  
  774. \itm If the first thing in a \col\ happens to be the control sequence
  775. \indx{{\tentt \bs span}}\[\int\]{\tt \bs tbar}, then the number
  776. of columns specified
  777. as \int\ are spanned by the entry (in this case a horizontal bar). The
  778. natural justification for the spanned entry will be that of the
  779. leftmost column spanned. (Note that {\tt span}\[\int\] is
  780. {\bo not} followed by a blank space as this can cause difficulties.)
  781. %\need1.25in
  782. \start{note}
  783. \centerline{-- NOTE --}
  784. While building tables, if a {\tt\+tablebar} or {\tt\+tablerow}
  785. runs more than one line of text (on the CRT), it is good practice
  786. to use the percent
  787. sign (\indx{{\tentt \%}}) at the end of each line.  This will tell \TeX\ to
  788. ignore anything else on that line and prevent
  789. possible problems with extra spaces being
  790. misinterpreted by \TeX .
  791. \finish{note}
  792. \level2{Fonts}
  793. Only a few fonts are preloaded in HP \TeX. These macros allow you
  794. to access a variety of font families, styles, and sizes.
  795.  
  796. \cmd{\indx{fontdef}\bs\lb{\sa command}\rb=\[\lb{\sa library}\rb,%
  797.     \lb{\sa font name}\rb\]}
  798. This command equates a command of your choice with a
  799. font (as used in the library). You can use \lb{\sa library}\rb
  800. (optional) to
  801. specify other than the default font library.
  802. This command differs from \TeX's {\tt\+font} command in that the
  803. font won't actually be loaded until
  804. the first request (if any).
  805.  
  806. \need.5in\bigskip\relax{{\tentt \+fivepoint}}\lbreak
  807.       \relax{{\tentt \+sixpoint}}\lbreak
  808.       \relax{{\tentt \+sevenpoint}}\lbreak
  809.       \relax{{\tentt \+eightpoint}}\lbreak
  810.       \relax{{\tentt \+ninepoint}}\lbreak
  811.       \relax{{\tentt \+tenpoint}}\lbreak
  812.       \relax{{\tentt \+tenpoint}}\lbreak
  813.       \relax{{\tentt \+fourteenpoint}}\lbreak
  814.       \relax{{\tentt \+eighteenpoint}}\lbreak
  815.       \relax{{\tentt \+twentyfourpoint}}\lbreak
  816. These commands select the font point size from five to twentyfour. (In
  817. {\bo Math Mode}, these commands only apply to the default
  818. font within a font family.  If you are using a current family
  819. other than {\tt\+fam0}, you must make the appropriate
  820. font assignments
  821. (see Appendix A, ``Changing Fonts in HP \TeX '').
  822.  
  823. %\mcmd{{cm}}\lbreak
  824.       %tr\lbreak
  825.       %gv}
  826. %These commands select Computer Modern, times roman
  827. %and geneva font families respectively.
  828. \need.5in\bigskip\relax{{\tentt \+rm}}\lbreak
  829.       \relax{{\tentt \+it}}\lbreak
  830.       \relax{{\tentt \+bf}}\lbreak
  831.       \relax{{\tentt \+sl}}\lbreak
  832.       \relax{{\tentt \+sa}}\lbreak
  833.       \relax{{\tentt \+tt}}\lbreak
  834. These commands select \indx{roman} style, \indx{italic}, \indx{bold face},
  835. \indx{slanted},
  836. \indx{sans serif}, and \indx{typewriter} style.
  837.  
  838. If the selected font is undefined, the font style is changed
  839. to roman. If that new font is still undefined, the size is
  840. changed to ten points. Computer Modern ten point
  841. roman will always be defined in HP \TeX.
  842.  
  843. \level2{Miscellaneous Macros}
  844.  
  845. %\cmd{\indx{indx\[\hor\]}
  846. %This command sets the \hor. The \hor\ along with the current page
  847. %number are then written to the file {\job.inx} for use as an index.
  848. %
  849. \cmd{\indx{note}\[\hor\]}
  850. This macro puts a footnote at the bottom of the current page
  851. and inserts a superscript footnote number at the location
  852. of the command and the footnote.
  853. Footnote numbers are allocated starting with~1 and can be
  854. reset by the use of {\tt\bs resetnotes}. The \hor\ is the footnote
  855. text.
  856.  
  857.  
  858. \cmd{\indx{need}\dim}
  859. The result of this macro is that if the page breaking algorithm
  860. of \TeX\ determines that the current position would optimally
  861. fall within \dim\ of the bottom of the page, the page is broken
  862. leaving some empty space at the bottom.
  863. \need1in
  864. \start{note}
  865. \centerline{-- NOTE --}
  866. Since the {\tt \bs need} command uses a negative penalty
  867. to {\bo encourage} (not {\bo force})  \TeX\ to break
  868. the page, it will
  869. not always have the effect you might anticipate. This is especially
  870. true if the command is encountered near
  871. the top of the current page and the remaining text will not
  872. adequately fill the current page.
  873. \finish{note}
  874. \cmd{\indx{super}\[\hor\]}
  875. The argument is printed as a superscript.
  876.  
  877. \cmd{\indx{sub}\[\hor\]}
  878. The argument is printed as a subscript.
  879.  
  880. \cmd{\indx{lbreak}}
  881. This macro forces a line break within a paragraph. It inserts ``hfil''
  882. \indx{glue} before the break, so the line will {\bo not} be right
  883. justified.  If you want right justification, use plain \TeX 's
  884. {\tt \bs break} command.
  885.  
  886. \cmd{\indx{uline}\[\hor\]}
  887. This macro causes the argument to be underlined.
  888.  
  889. \cmd{\indx{mon}}
  890. This command prints the current month name. For
  891. example, if the current month were August, {\tt\bs mon} would
  892. print the letters ``August'' in the current font.
  893.  
  894. \cmd{\indx{date}}
  895. This command prints the current date in the format Month Date, Year.
  896. For example, if today's date were 12 December 1984, {\tt\bs date}
  897. would print the characters ``December 12, 1984'' in the current font.
  898.  
  899. \cmd{\indx{hour}}
  900. This command prints the current time of day (for example -- 4:07 PM)
  901.  
  902. \level2{Block Structure}
  903. Certain local document styles are considered to belong to a ``block.''
  904. (\indx{Block structure}, as used here, simply refers to a portion of a
  905. file that has some common formatting instructions applied
  906. to it.)\note{\tenpoint The concept of {\tenbo \indx{grouping}}, explained
  907. in this manual and in {\it The \TeX book}, is basically the
  908. same as the ``\indx{block structure}'' referred to here.}
  909.  
  910. The current block is defined to be the most recently opened
  911. block. Pending blocks are blocks that have been opened but
  912. not closed. The HP \TeX\ macros {\tt\+start} and {\tt\+finish}
  913. are used to open and close blocks.
  914.  
  915. Valid \blk s pre-loaded in HP \TeX\ include {\tt indent, note,
  916.   warning, ver\-ba\-tim, twocol\-umns} and {\tt threecolumns},
  917.   all of which have been described in this chapter.
  918.  User defined blocks may be implemented by defining  a control
  919.  sequence, {\tt\bs BEGIN\blk} and, optionally, another
  920.  control sequence, {\tt\bs END\blk}.
  921.  
  922. \cmd{\indx{start}\[\blk\]}
  923. This command determines if a control sequence {\tt\+BEGIN\blk} has
  924. been defined.  If one exists, a new block is opened and the control
  925. sequence is invoked.  Otherwise, an \indx{error message} is issued and the
  926. command is ignored.
  927.  
  928. \cmd{\indx{finish}\[\blk\]}
  929. This command is used to close the current block and invoke the
  930. control sequence {\tt\+END\blk} if one has been defined. If \blk\ matches
  931. the current block name, the current block is closed. If not, an
  932. appropriate error message is issued and corresponding corrective
  933. action is taken. If \blk\ is not valid or there are no pending
  934. blocks, the command is ignored. If \blk\ is valid but does not
  935. match the current block
  936. name, {\tt\bs done} commands are inserted until either \blk\ matches
  937. the current block name or until all pending blocks are closed.
  938.  
  939. \cmd{\indx{done}}
  940. This command closes the current block without
  941. any error checking and invokes the control sequence {\tt\+END\blk} if
  942. one has been defined. A \TeX\ error message will be issued if
  943. there are no pending blocks.
  944.  
  945. Following is an sample usage of the {\tt\+BEGIN} and {\tt\+END}
  946. commands in creating user-defined blocks:
  947.  
  948. \def\BEGINexample{\bigskip\centerline{- EXAMPLE -}
  949.                 \medskip\leftskip.75in\rightskip.75in}
  950. \def\ENDexample{\medskip}
  951. \start{example}
  952. This example was created by defining the following block:\medskip
  953. \centerline{\tt \+def\+BEGINexample\[\+bigskip\+centerline\[- EXAMPLE -\]}
  954. \centerline{\tt ~~~~~~\+medskip\+leftskip.75in\+rightskip.75in\]~~~~~~}
  955. \medskip
  956. The block was opened using the command: {\tt\+start\[example\]}. The
  957. optional control sequence {\tt\+END\blk} was also used, as follows:\medskip
  958. \centerline{\tt \+def\+ENDexample\[\+medskip\]}\medskip
  959. The {\tt\+medskip} vertical glue will be inserted after the block is
  960. closed using the command: {\tt\+finish\[example\]}.
  961. \finish{example}
  962.  
  963.  
  964. \level1{\indx{HP 2688A} Control Macros}
  965.  
  966. These macros are for controlling certain features of the 2688A Laser
  967. Printer:
  968.  
  969. \level2{Page Copy Control}
  970.  
  971. \cmd{\indx{copies}\int}
  972. This macro assigns the number of copies per page starting with the current
  973. page. The copies are uncollated; in other words, if {\tt\bs copies5}
  974. occurred on page 3, the output will have five copies of page 3,
  975. then five copies of page 4, $etc.$ The control of the number of copies
  976. is accomplished through one of \TeX's counters.  Default is counter
  977. number~1.  Possible integers and their effect are shown below:
  978. \itm 1 to 32,767 will produce the specified number of copies.
  979. \itm Greater than 32,767 will produce 32,767 copies.
  980. \itm 0 will produce 1 copy.
  981. \itm Less than 0 (negative number) no copies (can be used
  982. to suppress certain sections of a document, $etc.$)
  983. \enditems
  984. The counter
  985. can be changed using the following macro.
  986.  
  987. \cmd{\indx{selectcopycounter}\lb {\sa integer from 0 to 9}\rb}
  988. This is used for changing which counter is used for controlling
  989. the number of \indx{copies} per page (default is 1). This command generally
  990. should not be used except by people who are writing their own
  991. macros.
  992.  
  993. \need.5in\bigskip\relax{{\tentt \+copieson}}\lbreak
  994.       \relax{{\tentt \+copiesoff}}\lbreak
  995. If the multiple copies feature is being used in a document, these
  996. macros can be used to alternate between one copy per page and the
  997. number of copies assigned by the {\tt\bs copies} macro. The difference between
  998. {\tt\bs copiesoff} and {\tt\bs copies1}~is that when the former is followed
  999. with {\tt\bs copieson}, the original number of copies is restored, whereas
  1000. when the latter is followed with {\tt\bs copieson}, there is,
  1001. of course, no effect.
  1002.  
  1003. \level2{Logical Page Control}
  1004.  
  1005. The Print Server features a concept called ``\indx{logical paging}''
  1006. which is controlled using the following set of macros. A
  1007. logical page is a rectangular addressing space on the sheet of paper
  1008. (referred to as the ``\indx{physical page}''). Logical pages have an
  1009. orientation (\indx{portrait}, \indx{landscape}, \indx{reverse portrait}
  1010. or \indx{reverse lanscape}) and a position on the physical page.
  1011. Through the operator
  1012. interface of PS2688A, you may define a list of logical pages that
  1013. may be written to on any sheet of paper.
  1014. These logical page specifications may also be stored in a PS2688A
  1015. input file to avoid typing in the specifications for each job.
  1016. Using these macros, you
  1017. can address the logical pages with either of two methods:
  1018. either by explicitly specifying a logical page for each page of
  1019. \TeX\ output, or by specifying an ordered list of logical pages
  1020. and letting the system cycle through the list.
  1021.  
  1022. \cmd{\indx{lpdef}\[\lb\sa logical page definition\rb\]}
  1023. This command defines a logical page size and orientation.  The
  1024. \lb{\sa logical page definition}\rb
  1025. consists of the logical page
  1026. number, followed by the {\bo left},
  1027. then the {\bo top} dimensions (distance from the
  1028.  edges of the physical page), and the
  1029. \indx{logical page orientation} (portrait, landscape, rev--portrait or
  1030. rev--landscape). Orientation may be abbreviated {\tt P,L,RP,}and
  1031. {\tt RL,} respectively, and either upper or lower case
  1032. characters will work. The edges of the page that
  1033. would normally be the top and left as viewed from that
  1034. logical page's orientation are
  1035. always considered top and left in this context.
  1036.  An example usage follows:\medskip
  1037. \centerline{\tt \bs lpdef \[1, 1.5in, 3in, L\]}\medskip
  1038. This would cause logical page number 1~to be printed
  1039. in {\bo landscape} orientation, with the left edge of the
  1040. print (as viewed from landscape orientation) beginning 1.5~inches
  1041. from the edge of the physical page.  The ``top'' (left-hand
  1042. edge along the paper path) will begin 3~inches from the
  1043. edge.
  1044.  
  1045. The default values for logical pages in HP \TeX\ are: LEFT=1in,
  1046. TOP=1in.
  1047.  
  1048.  
  1049.  
  1050.  
  1051. \start{note}
  1052. \centerline{-- NOTE --}
  1053. The dimension specified as distance from the top edge does not
  1054. take into account the space needed for headings.  If running headings
  1055. are to be used, the logical page definition should allow extra
  1056. room for them when specifying ``top'' dimension. (Footings
  1057. are also printed ``in the margin,'' so when specifying
  1058. {\tt vsize} be sure to leave room for them.)
  1059. \finish{note}
  1060.  
  1061. \cmd{\indx{lplist}\[\lb\sa logical page list\rb\]}
  1062. This command specifies the logical page list to be used whenever
  1063. logical pages are being used implicitly. Only one such
  1064. specification is allowed within a document, if more than one exist,
  1065. all but the last are ignored. This command initializes
  1066. implied logical paging.
  1067.  
  1068.  The \lb {\sa logical page list}\rb ~is a list
  1069. of integer numbers from 1~to 32~which have been defined
  1070. using the {\tt \bs lpdef} command. Positive number entries will
  1071. cause a physical page eject prior to initiating the logical
  1072. page entry.  Negative numbers require no such physical
  1073. page eject.  Each entry number should be separated from
  1074. the next by a comma.
  1075.  
  1076. %\need3in
  1077. \medskip The remaining commands control explicit logical paging. If any of
  1078. these commands occur within a page, a page eject is issued and the
  1079. next page to be printed will be dependant upon the particular
  1080. command. If any of these commands occur on the top of a page, the
  1081. prescribed action will be delayed until the next page break
  1082. (be it natural or forced by a {\tt\bs newpage}, {\tt\bs eject}, $etc.$).
  1083. For example, suppose the first page of every chapter in a
  1084. document uses logical page 5, then {\tt\bs ppageto5} {\tt\bs lpresume}
  1085. would eject the current page (assuming it is not empty), issue
  1086. a physical page eject and begin printing on page 5. Later,
  1087. when the page is full, \TeX\ breaks the page and resumes printing
  1088. according to the logical page list.
  1089.  
  1090. \cmd{\indx{lpageto}\lb {\sa integer between 1 and 32}\rb}
  1091. This command causes the next page to be printed on the specified
  1092. logical page. No physical page eject is implied.
  1093.  
  1094. \cmd{\indx{ppageto}\lb {\sa integer between 1 and 32}\rb }
  1095. This command is similar to {\tt\bs lpageto} but implies a physical
  1096. page eject prior to printing on the specified logical page.
  1097.  
  1098. \cmd{\indx{lpresume}}
  1099. This command is used after a {\tt\+ppageto}  or {\tt\+lpageto}
  1100. command to resume
  1101. printing on the current page of the logical page list.
  1102.  
  1103. \cmd{\indx{lpreset}}
  1104. This command resets the logical page list and prints on the first
  1105. page in the list.
  1106.  
  1107. \cmd{\indx{lpexit}}
  1108. This command exits the current loop in the logical page list and
  1109. prints on the next page in the list.
  1110.  
  1111. \cmd{\indx{selectlpcounter}\int}
  1112. This is used for changing which counter is used for specifying the
  1113. logical page (default is 2). This macro generally should not be used
  1114. except by people who are writing their own macros.
  1115. \vfill\eject
  1116.  
  1117. % THIS BEGINS THE SAMPLE PAGE***
  1118.  
  1119. \def\oddheading{\vbox{\hbox to \hsize{\eightrm A Sample Document
  1120.                                         \hfil Page \folio}
  1121.                \nointerlineskip\vskip2pt
  1122.                \hbox{\vrule width \hsize height .4pt}}}
  1123. \centerfooting{\eightbf THIS DOCUMENT WAS CREATED USING \HPTEX}
  1124. \firstlevelhead{\leftline{\fourteenbf\levelno\enspace%
  1125.                 \title}%
  1126.      \medskip\ctswrite{\hskip15pt\tenrm\title}}
  1127. \numbereditems
  1128. \level1{Formatting a \indx{Sample Document}}
  1129. In this section we will format a simple document
  1130. utilizing many of the HP \TeX\ macros.
  1131. For this example, we will accept all the HP \TeX\ default values for the
  1132. various commands.
  1133. \vskip.5in
  1134. \centerline{\twelvebf A Sample Document}
  1135.  
  1136. Isn't that nice? If we wanted to, we could have easily set that off to the
  1137. right like this:\lbreak
  1138. \rightline{\twelvebf A Sample Document}
  1139.  
  1140. Now, how about \textbox{a textbox?}  Those are
  1141. always fun. Or, if we really want to set something off, we could
  1142. ask \TeX\ to:
  1143. \centerbox{put it inside\cr
  1144.            a nice little\cr
  1145.            centered box,}
  1146. or, maybe just \boxit{``boxit'' --  like this.}
  1147.  
  1148. But say you're really serious about getting someone's attention.
  1149.  
  1150. \start{warning}
  1151. \centerline{\bf LOOK!}
  1152. \centerline{You can use the ``Warning'' command, like we did here.}
  1153. \finish{warning}
  1154.  
  1155. Now, let's use the extraordinary capabilities of \TeX\ to
  1156. generate a mathematical formula:
  1157. $$\hat{n}_2(s)={1\over \alpha_2}\biggl[ \biggl({\partial C_2\over
  1158.      \partial x} \biggr)_{x=0}+{k_1 \hat{n}_1\over D_1} \biggr]$$
  1159. Next, we'll create a table to show the dimensional units available in \TeX :
  1160. \medskip
  1161. \tableformat{\centerline|\centerline 1in|\leftline 1.2in|\centerline 1in|%
  1162.   \centerline .05in|\centerline 1in|\leftline 1.2in|\centerline 1in}
  1163. \tablebar{|\span7\tbar|}
  1164. \tablerow{|\TeX\ UNIT|DESCRIPTION|PER INCH||\TeX\ UNIT|DESCRIPTION|PER INCH|}
  1165. \tablebar{|\span7\tbar|}
  1166. \tablerow{|{\tt in}|inch|1||{\tt mm}|millimeter|25.4|}
  1167. \tablerow{|{\tt cm}|centimeter|2.54||{\tt dd}|Didot point|67.54|}
  1168. \tablerow{|{\tt pt}|printer's point|72.27||{\tt bp}|big point|72|}
  1169. \tablerow{|{\tt pc}|pica|6.02|| | | |}
  1170. \tablebar{|\span7\tbar|}
  1171. \medskip
  1172. Itemized lists are very useful:
  1173. \itm For listing things.
  1174. \itm For making a series of points.
  1175. \sitm You can even use subitems.
  1176. \enditems
  1177. Now, look at the next page to see exactly how this sample
  1178. document was formatted.
  1179. \vfil\eject
  1180.  
  1181.  
  1182. \nofooting
  1183. \centerline{\bf Here's the source file for ``\indx{Sample Document}''}
  1184. \medskip
  1185. \start{verbatim}{\tentt\inset=.6in\start{indent}
  1186. \+noindentstyle
  1187. \+centerfooting\[\+eightbf THIS DOCUMENT WAS CREATED USING \+HPTEX\]
  1188. \+null\+bigskip
  1189. \+centerline\[\+twelvebf A Sample Document\]
  1190.  
  1191. Isn't that nice? If we wanted to, we could have easily set that off to the
  1192. rightlike this:\+lbreak
  1193. \+rightline\[\+twelvebf A Sample Document\]
  1194.  
  1195. Now, how about \+textbox\[a textbox?\]   Those are always
  1196. fun. Or, if we really want to set something off, we could ask \+TeX\+ to:
  1197. \+centerbox\[put it inside\+cr
  1198.            a nice little\+cr
  1199.            centered box,\]
  1200. or, maybe just \+boxit\[``boxit'' -- like this.\]
  1201.  
  1202. But say you're really serious about getting someone's attention.
  1203.  
  1204. \+start\[warning\]
  1205. \+centerline\[\+bf LOOK!\]
  1206. \+centerline\[You can use the ``Warning'' command, like we did here.\]
  1207. \+finish\[warning\]
  1208.  
  1209. Now, let's use the extraordinary capabilities of \+TeX\+ to
  1210. generate a mathematical formula:
  1211. $$\+hat\[n\]_2(s)=\[1\+over \+alpha_2\] \+biggl[ \+biggl(\[\+partial C_2\+over
  1212.      \+partial x\]  \+biggr)_\[x=0\] +\[k_1 \+hat\[n\]_1\+over D_1\]  \+biggr]$$
  1213. Next, we'll create a table to show the dimensional units available in \+TeX :
  1214. \+medskip
  1215. \+tableformat\[\+centerline|\+centerline 1in|\+leftline 1.2in|%
  1216.      \+centerline 1in|\+centerline .05in|%
  1217.      \+centerline 1in|\+leftline 1.2in|\+centerline 1in\]
  1218. \+tablebar\[|\+span7\+tbar|\]
  1219. \+tablerow\[|\+TeX\+ UNIT|DESCRIPTION|PER INCH||\+TeX\+ UNIT|DESCRIPTION|PER INC
  1220. \+tablebar\[|\+span7\+tbar|\]
  1221. \+tablerow\[|\[\+tentt in\]|inch|1||\[\+tentt mm\]|millimeter|25.4|\]
  1222. \+tablerow\[|\[\+tentt cm\]|centimeter|2.54||\[\+tentt dd\]|Didot point|67.54|\]
  1223. \+tablerow\[|\[\+tentt pt\]|printer's point|72.27||\[\+tenttbp\]|big point|72|\]
  1224. \+tablerow\[|\[\+tentt pc\]|pica|6.02|| | | |\]
  1225. \+tablebar\[|\+span7\+tbar|\]
  1226. \+medskip
  1227. Itemized lists are very useful:
  1228. \+itm For listing things.
  1229. \+itm For making a series of points.
  1230. \+sitm You can even use subitems.
  1231. \+enditems
  1232. Now, look at the next page to see exactly how this sample document was
  1233. formatted.
  1234. \+vfil\+eject
  1235. \finish{indent}
  1236. }
  1237. \finish{verbatim}
  1238.  
  1239. \bye
  1240.  
  1241.